<template>
    <div>
        <addList @addleveList="AddList"></addList>
        <leveList :list="tableData" type="2"></leveList>
    </div>
</template>

<script setup lang="ts">

import { ref, onMounted } from 'vue';



import { lookLeveList } from '@/server/leveServer';

import addList from "../components/addList.vue";
import leveList from "../components/LeveList.vue";


const tableData: any = ref([]);

onMounted(async () => {
    const res = await lookLeveList()
    console.log(res.data.result);
    tableData.value = res.data.result
})

const AddList = (item: any) => {
    console.log(item);
    tableData.value.push(item[0])
}






</script>

<style scoped>

</style>